<?php


namespace App\Http\Controllers\Api\Repositories;


use App\Models\WxPlate as Model;

class WxPlateRepositores
{
    /**
     * Model.
     *
     * @var string
     */
    protected $eloquentClass = Model::class;


    public function options()
    {
        $plate = (new $this->eloquentClass())->where('plate_state',1)->get(['id','plate_name']);
//        $arr = [];
//        foreach ($plate as $v){
//            $arr[$v['id']] = $v['plate_name'];
//        }
        return $plate;
    }


    public static function list()
    {

        return (new Model())->where('plate_state',1)->orderBy('sort','asc')->get(['id','plate_name']);
    }
}
